package com.codefish.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.codefish.dto.BaseCommonTypeDto;
import com.codefish.entity.SysBaseCommonEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * 
 * @author codefish
 * @email cool_fish@aliyun.com
 * @date 2021-04-23 11:45:28
 */
@Repository
@Mapper
public interface SysBaseCommonDao extends BaseMapper<SysBaseCommonEntity> {

    /**
     * 获取所有公共字段分类
     * @return
     */
    List<BaseCommonTypeDto> getBaseCommonTypeList();

    void updateStatusAndIsDel(Long[] ids);

    /**
     * 判断名称、分类和启用状态为启用
     * @param sysBaseCommon
     * @return
     */
    int queryCountByNameAndType(SysBaseCommonEntity sysBaseCommon);
}
